package com.april.pattern.structural.bridge;

import org.junit.jupiter.api.Test;

/**
 * @author April
 * @version V1.0.0
 * @date 2019/07/06 12:41
 * @description
 */
public class BridgeTest {
    /**
     * 测试桥接模式
     */
    @Test
    public void bridgeTest() {
        Bank abcBank = new ABCBank(new DepositAccount());
        Account abcAccount = abcBank.openAccount();
        abcAccount.showAccountType();

        System.out.println("===================");

        Bank abcBank2 = new ABCBank(new SavingAccount());
        Account abcAccount2 = abcBank.openAccount();
        abcAccount2.showAccountType();

    }
}
